class ClassList(object):
    def __init__(self, name, id, mentor, student_list):
        self.name = name
        self.id = id
        self.mentor = mentor
        self.student_list = student_list


    def show_info(self):
        print("*" * 15 + "信息如下：" + "*" * 15)
        print("班级名称：%s" % self.name)
        print("班级号：%d" % self.id)
        print("辅导员：%s" %self.mentor.name)
        print("学生列表：")
        for stu in self.student_list:
            print(stu.name)


    def add_student(self, student):
        if student in self.student_list:
            raise Exception('学生已经存在！')
        else:
            self.student_list.append(student)
            return True


    def remove_student(self, student):
        if student in self.student_list:
            self.student_list.remove(student)
            return True
        else:
            raise Exception('学生不存在！')